package com.finance.capacity.siteCoefficientDaily.capService;

import com.finance.capacity.siteCoefficientDaily.bean.pojo.SiteCoeDaily;
import com.finance.capacity.siteCoefficientDaily.bean.pojo.SiteCoeDailyList;
import com.finance.capacity.siteCoefficientDaily.capDao.SiteCoefficientDailyMapper;
import com.finance.framework.lang.Page;
import com.finance.framework.lang.PageResultBO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @Author: ly
 * @Date: Created in 2017/8/24
 * @Description:
 */
@Service
public class SiteCoefficientDailyService implements ISiteCoefficientDailyService {
    @Autowired
    private SiteCoefficientDailyMapper siteCoeDailyMapper;

    @Override
    public PageResultBO<SiteCoeDaily> coeTrendList(Page page) {
        PageResultBO<SiteCoeDaily> pageResultBO = new PageResultBO<SiteCoeDaily>();
        List<SiteCoeDaily> list = siteCoeDailyMapper.listByPage(page);
        pageResultBO.setTotalRecord(page.getTotalRecord());
        pageResultBO.setPageSize(page.getPageSize());
        pageResultBO.setPageNo(page.getPageNo());
        pageResultBO.setDataList(list);
        return pageResultBO;
    }

    @Override
    public List<SiteCoeDaily> exportList(SiteCoeDailyList siteCoeDailyList) {
        return siteCoeDailyMapper.exportList(siteCoeDailyList);
    }

    @Override
    public Boolean add(SiteCoeDaily siteCoeDaily) {
        return siteCoeDailyMapper.add(siteCoeDaily)>0;
    }


}



